<template>
  <q-layout view="hHh Lpr lFr"  class="rounded-borders page-layout">
    <MainHeader />
    <div @click="closeDrawer" >
      <q-page-container >
        <router-view  />
      </q-page-container>
    </div>
  </q-layout>
  <GnsFooter></GnsFooter>
</template>

<script setup lang="ts">
import MainHeader from 'src/components/MainHeader.vue';
import { useVersionStore } from 'src/stores/versionStore';
import { useHeaderStore } from 'src/stores/headerStore';
import GnsFooter from 'src/components/GnsFooter.vue'
import { useUser } from 'src/stores/userStore';
import { useRouter } from 'vue-router';

const versionStore = useVersionStore();

versionStore.init();

const user = useUser();

const router = useRouter();

if (!user.isLogin){
  router.push({
    name: 'login',
  });
}

const useHeader = useHeaderStore()

function closeDrawer() {
 useHeader.close()
}
</script>

<style scoped>
.bg {
  background-color: #f6f6f8;
}


.page-layout {
  display: flex;
  justify-content: center;
/*   background: linear-gradient(170.04deg, #FFFFFF 5.35%, #F1F5FF 70.42%, #D3E0FF 96.94%); */
  
}
</style>

<style>
html {
  font-size: 62.5%;
}
</style>